package com.blog.blog.controller;

import com.alibaba.fastjson.JSONObject;
import com.blog.blog.service.InterestTribeService;
import com.blog.blog.vo.WebResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("interestTribe")
public class InterestTribeController {

    @Autowired
    private InterestTribeService interestTribeService;

    /**
     * 查询个人全部的兴趣部落
     */
    @GetMapping("findAllPersonalInterestTribe")
    public WebResult<List<JSONObject>> findAllPersonalInterestTribe() {
        return WebResult.<List<JSONObject>>builder()
                .code(200)
                .message(WebResult.REQUEST_STATUS_SUCCESS)
                .data(interestTribeService.findAllPersonalInterestTribe())
                .build();
    }
}
